import {http} from "@/api/index";

const area = {
    getAreaTree:'/area/tree',
    addArea:'/area/add',
    deleteAreaById:'/area/delete',
    updateArea:'/area/update',
}


export const getAreaTree = (params)=>{
    return http.request({
        url:area.getAreaTree,
        method:'get',
        params: params
    })
}
export const addArea = (params)=>{
    return http.request({
        url:area.addArea,
        method:'post',
        data:params
    })
}
export const deleteAreaById = (areaId)=>{
    return http.request({
        url:area.deleteAreaById,
        method:'get',
        params:{
            areaId:areaId
        }
    })
}
export const updateArea = (params)=>{
    return http.request({
        url:area.updateArea,
        method:'post',
        data:params
    })
}

